/* Define if GStreamer support is available */
#mesondefine HAVE_GSTREAMER
-/* Define to 1 if you have the `httpGetAuthString' function. */
-#mesondefine HAVE_HTTPGETAUTHSTRING
-
-/* Define if cups http_t authstring field is accessible */
-#mesondefine HAVE_HTTP_AUTHSTRING
-
/* Define to 1 if you have the <inttypes.h> header file. */
#mesondefine HAVE_INTTYPES_H
httpClearFields (request->http);
httpSetField (request->http, HTTP_FIELD_CONTENT_LENGTH, length);
httpSetField (request->http, HTTP_FIELD_CONTENT_TYPE, "application/ipp");
-#ifdef HAVE_HTTPGETAUTHSTRING
httpSetField (request->http, HTTP_FIELD_AUTHORIZATION, httpGetAuthString (request->http));
-#else
-#ifdef HAVE_HTTP_AUTHSTRING
- httpSetField (request->http, HTTP_FIELD_AUTHORIZATION, request->http->authstring);
-#endif
-#endif
if (httpPost (request->http, request->resource))
{
}
httpClearFields (request->http);
-#ifdef HAVE_HTTPGETAUTHSTRING
httpSetField (request->http, HTTP_FIELD_AUTHORIZATION, httpGetAuthString (request->http));
-#else
-#ifdef HAVE_HTTP_AUTHSTRING
- httpSetField (request->http, HTTP_FIELD_AUTHORIZATION, request->http->authstring);
-#endif
-#endif
if (httpGet (request->http, request->resource))
{
cups_major_version = cc.compute_int('CUPS_VERSION_MAJOR', prefix : '#include <cups/cups.h>')
cups_minor_version = cc.compute_int('CUPS_VERSION_MINOR', prefix : '#include <cups/cups.h>')
message('Found CUPS version: @0@.@1@'.format(cups_major_version, cups_minor_version))
- if cups_major_version >= 2
- if cc.compiles('#include <cups/http.h> \n http_t http; char *s = http.authstring;')
- cdata.set('HAVE_HTTP_AUTHSTRING', 1,
- description :'Define if cups http_t authstring field is accessible')
- endif
+ if cups_major_version < 2
+ cups_error = 'Need CUPS version >= 2.0'
+ else
libcups = cc.find_library('cups', required : true)
- if libcups.found() and cc.has_function('httpGetAuthString', dependencies : libcups)
- cdata.set('HAVE_HTTPGETAUTHSTRING', 1)
- endif
-
print_backends += ['cups']
- else
- error('Need CUPS version >= 2.0')
endif
else
error('Cannot find CUPS headers in default prefix.')